<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title>Title</title>
    <style>
        .div {
            position: relative;
            left: 0px;
            right: 0px;
            top: 0px;
            bottom: 0px;
            height: 100vh;
        }

        .box {
            background: #eee;
            padding: 10px 0;
            white-space: nowrap; /*文本不会换行，文本会在在同一行上继续*/
            overflow-x: auto; /*可滑动*/
        }

        /*自定义滚动条的伪对象选择器, CSS 可以隐藏滚动条*/
        /*.box::-webkit-scrollbar{
            display: none;
        }*/
        .box1 {
            width: 49%;
            margin-left: 3%;
            height: 100px;
            background: #fff;
            display: inline-block; /*行内块元素*/
        }

        main {
            overflow-y: auto;
            height: 340px;
            margin-bottom: 100px;
        }

        .item {
            height: 200px;
            background-color: #00D1FF;
            margin: 10px auto;
        }
    </style>
</head>
<body>
<!--外部嵌套层-->
<div class="div">
    <div class="box">
        <div class="box1"></div>
        <div class="box1"></div>
        <div class="box1"></div>
        <div class="box1"></div>
        <div class="box1"></div>
    </div>
    <main>
        <div class="item">
            <p>this is item</p>
        </div>
        <div class="item">
            <p>this is item</p>
        </div>
        <div class="item">
            <p>this is item</p>
        </div>
        <div class="item">
            <p>this is item</p>
        </div>
        <div class="item">
            <p>this is item</p>
        </div>
        <div class="item">
            <p>this is item</p>
        </div>
        <div class="item">
            <p>this is item</p>
        </div>
        <div class="item">
            <p>this is item</p>
        </div>
        <div class="item">
            <p>this is item</p>
        </div>
        <div class="item">
            <p>this is item</p>
        </div>
    </main>
    <footer style="height: 100px;width: 100%; background-color: #DE8910;position: absolute;bottom: 0px;left: 0px">
        <div>
            <p>this is footer</p>
        </div>
    </footer>

</div>
</body>
</html>
